﻿<ribbon:RibbonWindow x:Class="MarcelJoachimKloubert.ScriptEngine.Editor.Windows.MainWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:avalon="http://icsharpcode.net/sharpdevelop/avalonedit"
                     xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
                     Width="800"
                     Height="600"
                     WindowStartupLocation="CenterScreen">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <ribbon:Ribbon x:Name="Ribbon">
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="../Resources/Icons/1384719868_script.png">
                    <ribbon:RibbonApplicationMenuItem Header="AppItem 1" ImageSource="../Resources/Icons/1384719868_script.png" />
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>

            <ribbon:RibbonTab x:Name="HomeTab" Header="HomeTab">
                <ribbon:RibbonGroup x:Name="Group1" Header="Group1">
                    <ribbon:RibbonButton x:Name="Button1"
                                         Label="Button1"
                                         LargeImageSource="../Resources/Icons/1384719868_script.png" />
                </ribbon:RibbonGroup>

            </ribbon:RibbonTab>

            <ribbon:RibbonTab x:Name="ContextTab"
                              ContextualTabGroupHeader="ContextGroup1"
                              Header="ContextTab" />

            <ribbon:Ribbon.QuickAccessToolBar>
                <ribbon:RibbonQuickAccessToolBar>
                    <ribbon:RibbonButton x:Name="ButtonQ1"
                                         Label="ButtonQ1"
                                         SmallImageSource="../Resources/Icons/1384719868_script.png" />
                </ribbon:RibbonQuickAccessToolBar>
            </ribbon:Ribbon.QuickAccessToolBar>

        </ribbon:Ribbon>

        <avalon:TextEditor x:Name="TextEditor_Main"
                           Grid.Row="1"
                           FontFamily="Consolas"
                           FontSize="12pt"
                           Padding="8"
                           SyntaxHighlighting="JavaScript">


            <avalon:TextEditor.InputBindings>
                <KeyBinding Key="Space"
                            Command="{Binding Path=OpenIntellisenseCommand,
                                              Mode=OneWay,
                                              UpdateSourceTrigger=PropertyChanged}"
                            CommandParameter="{Binding ElementName=TextEditor_Main,
                                                       Path=TextArea,
                                                       Mode=OneWay,
                                                       UpdateSourceTrigger=PropertyChanged}"
                            Modifiers="Control" />
            </avalon:TextEditor.InputBindings>
        </avalon:TextEditor>
    </Grid>
</ribbon:RibbonWindow>